	<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="uct" uri="/WEB-INF/uct.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <%@ include file="/common/sale/include/common-base.jsp"%>
  <title>WHQ | 基础平台-${titleName }</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <!-- top start -->
  <%@include file="/common/sale/top.jsp" %>
  <!-- top end -->
  <!-- left start -->
  <%@include file="/common/sale/left.jsp" %>
  <!-- left end-->

  <div class="content-wrapper">
  		
  		
  		
		<section class="content">
		<div class="row">
		        <div class="col-xs-12">
		      
					     <div class="box box-danger">
					       <br/>
				             <div class="box-header with-border">
				             	<center>
				             	
					             	<form id="searchFrom" class="form-horizontal">
												<input type="hidden" name="doCode" value="memberList"/>
												<input type="hidden" name="auditStatus" value="10"/>
												产品编号：<input type="text" class="form-control" style="height: 30px; display: inline; width: 13%;"  name="memberEname" id="memberEname" value="" />
												产品名称: <input type="text" class="form-control" style="height: 30px; display: inline; width: 13%;"  name="memberCname" id="memberCname" value="" />
												<button type="button" class="btn btn-primary" onclick="getTableData();">查询</button>
												<button  type="button" class="btn btn-primary" onclick="cleanData('searchFrom');">重置 </button>
								    </form>
				             	
				             	</center>
									<div class="box-body">
							              <table id="example" class="table table-bordered table-hover" >
							                <thead>
							                <tr>
							                  <th>产品编号</th>
							                  <th>产品名称</th>
							                  <th>发行对象</th>
							                  <th>理财方式</th>
							                  <th>操作</th>
							                </tr>
							                </thead>
							                <tbody>
							                </tr>
							                	<td>c001</td>
							                	<td>慧聚财1号</td>
							                	<td>个人</td>
							                	<td>普通理财</td>
							                	<td><button type="button" class="btn btn-danger btn-xs" onclick="toAudit();">审核</button></td>
							                 <tr>
							                </tr>
							                	<td>c002</td>
							                	<td>嘉实11</td>
							                	<td>企业</td>
							                	<td>理财套餐</td>
							                	<td><button type="button" class="btn btn-danger btn-xs" onclick="toAudit();">审核</button></td>
							                 <tr>
							                </tr>
							                	<td>p003</td>
							                	<td>旺嘉财1号</td>
							                	<td>个人</td>
							                	<td>普通理财</td>
							                	<td><button type="button" class="btn btn-danger btn-xs" onclick="toAudit();">审核</button></td>
							                 <tr>
							                </tr>
							                	<td>d001</td>
							                	<td>齐辉财5号</td>
							                	<td>个人</td>
							                	<td>普通理财</td>
							                	<td><button type="button" class="btn btn-danger btn-xs" onclick="toAudit();">审核</button></td>
							                 <tr>
							                </tr>
							                	<td>c005</td>
							                	<td>慧聚财12号</td>
							                	<td>个人</td>
							                	<td>普通理财</td>
							                	<td><button type="button" class="btn btn-danger btn-xs" onclick="toAudit();">审核</button></td>
							                 <tr>
							               <!--  <tbody id="myList"> -->
							                </tbody>
							              </table>
							              <center>
							    	  		<ul id="pageList"></ul>
							              </center>
							           </div>		
				             </div>
				        </div>
				</div>
		</div>
		</section>
    <!-- Main start -->

    <!-- Main end -->
  </div>
  <!-- /.content-wrapper -->
  <!-- foot start -->
  <%@include file="/common/sale/foot.jsp" %>
  <!-- foot start -->
  <!-- right start -->
  <%@include file="/common/default/right.jsp" %>
  <!-- right start -->
  
<div class="modal fade" id="my_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
							&times;
						</button>
						<h4 class="modal-title">
							<font color="red">机构信息</font>&nbsp;
						</h4>
					</div>
					<div class="modal-body">
						<form class="form-horizontal" role="form" id="orgForm">
							<input type="" name="formToken" id="formToken" value="${formToken}">
							<input name="deptName" id="deptName" type="hidden" value="${loginUser.deptCname}" />
							<input name="deptId" id="deptId" type="hidden" value="${loginUser.deptId}" />
							<input name="memberLevel" id="memberLevel" type="hidden" value="2" />
							<input name="editType" id="editType" type="hidden" value="1" />
							<input name="memberId" id="memberId" type="hidden" value="${param.memberId }" />
					        <div class="box-body" id="orgFormData">
					          <!-- Custom Tabs -->
					          <div class="nav-tabs-custom">
					            <ul class="nav nav-tabs">
					              <li class="active"><a href="#tab_1" data-toggle="tab">基本信息</a></li>
					              <li><a href="#tab_2" data-toggle="tab">联系信息</a></li>
					              <li><a href="#tab_3" data-toggle="tab">财务信息</a></li>
					              <li><a href="#tab_4" data-toggle="tab">银行信息</a></li>
					            </ul>
					            
					            
					            <div class="tab-content">
					              <div class="tab-pane active" id="tab_1">
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >会员账号</label>
					                  <div class="col-sm-8">
					                    <input type="text" id="memberEname" name="memberEname" class="form-control" required placeholder="必填项" >
										
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >会员全称</label>
					                  <div class="col-sm-8">
					                    <input type="text" id="memberCname" name="memberCname" class="form-control" required placeholder="必填项">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >会员简称</label>
					                  <div class="col-sm-8">
					                  <input type="text"  id="shortName" name="shortName" class="form-control" required placeholder="必填项">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >会员属性</label>
					                  <div class="col-sm-8">
					                  <input type="radio"  name="memberType" value="0" checked="checked" />个人
									  <input type="radio"  name="memberType" value="1" />机构
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >会员类型</label>
					                  <div class="col-sm-8">
					                  <span id="memberRoleArray" > </span>
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >注册时间</label>
					                  <div class="col-sm-8">
					                  <input type="text" class="form-control" 
										onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"
										class="Wdate" id="regTime" name="regTime" value="">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >入会时间</label>
					                  <div class="col-sm-8">
					                  <input type="text" class="form-control" 
										onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"
										class="Wdate" id="str50_1" name="str50_1"
										value="">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >证件类型</label>
					                  <div class="col-sm-8">
					                   <select id="certType" name="certType" class="form-control" >
											<option value="">--请选择--</option>
										</select>
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >证件号码</label>
					                  <div class="col-sm-8">
					                  <input type="text" id="certNo" class="form-control"  name="certNo" value="">
					                  </div>
					                </div>
					              </div>
					              <!-- /.tab-pane -->
					              <div class="tab-pane" id="tab_2">
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >移动电话</label>
					                  <div class="col-sm-8">
					                   <input type="text"  id="mobile" name="mobile" class="form-control" required placeholder="必填项" >
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >固定电话</label>
					                  <div class="col-sm-8">
					                   <input type="text" id="phone" name="phone" class="form-control" required placeholder="必填项">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >邮箱</label>
					                  <div class="col-sm-8">
					                   <input type="text" id="email" name="email" class="form-control" required placeholder="必填项">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-2 control-label" >邮政编码</label>
					                  <div class="col-sm-8">
					                   <input type="text"  id="str50_15" name="str50_15" class="form-control" required placeholder="必填项">
					                  </div>
					                </div>
					              </div>
					              <!-- /.tab-pane -->
					              <div class="tab-pane" id="tab_3">
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >个人收入情况</label>
					                  <div class="col-sm-8">
					                  	<select id="str50_14" name="str50_14" style="text-align: center;" class="form-control" >
											<option value="">--请选择--</option>
											<option value="10万以下">10万以下</option>
											<option value="10万-30万">10万-30万</option>
											<option value="30万-50万">30万-50万</option>
											<option value="50万-100万">50万-100万</option>
											<option value="100万-300万">100万-300万</option>
											<option value="300万-500万">300万-500万</option>
											<option value="500万-800万">500万-800万</option>
											<option value="800万-1000万">800万-1000万</option>
											<option value="1000万以上">1000万以上</option>
										</select>
					                  </div>
					                 </div>
					                 <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >家庭合计收入情况</label>
					                  <div class="col-sm-8">
										<select id="str50_16" name="str50_16" style="text-align: center;" class="form-control" >
											<option value="">--请选择--</option>
											<option value="10万以下">10万以下</option>
											<option value="10万-30万">10万-30万</option>
											<option value="30万-50万">30万-50万</option>
											<option value="50万-100万">50万-100万</option>
											<option value="100万-300万">100万-300万</option>
											<option value="300万-500万">300万-500万</option>
											<option value="500万-800万">500万-800万</option>
											<option value="800万-1000万">800万-1000万</option>
											<option value="1000万以上">1000万以上</option>
										</select>
					                  </div>
					                 </div>
					                 <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >个人金融净资产情况</label>
					                  <div class="col-sm-8">
										<select id="str50_17" name="str50_17" style="text-align: center;" class="form-control" >
											<option value="">--请选择--</option>
											<option value="10万以下">10万以下</option>
											<option value="10万-30万">10万-30万</option>
											<option value="30万-50万">30万-50万</option>
											<option value="50万-100万">50万-100万</option>
											<option value="100万-300万">100万-300万</option>
											<option value="300万-500万">300万-500万</option>
											<option value="500万-800万">500万-800万</option>
											<option value="800万-1000万">800万-1000万</option>
											<option value="1000万以上">1000万以上</option>
										</select>
					                  </div>
					                 </div>
					                 <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >家庭金融净资产情况</label>
					                  <div class="col-sm-8">
										<select id="str50_18" name="str50_18" style="text-align: center;" class="form-control" >
											<option value="">--请选择--</option>
											<option value="10万以下">10万以下</option>
											<option value="10万-30万">10万-30万</option>
											<option value="30万-50万">30万-50万</option>
											<option value="50万-100万">50万-100万</option>
											<option value="100万-300万">100万-300万</option>
											<option value="300万-500万">300万-500万</option>
											<option value="500万-800万">500万-800万</option>
											<option value="800万-1000万">800万-1000万</option>
											<option value="1000万以上">1000万以上</option>
										</select>
					                  </div>
					                 </div>
					              </div>
					              <div class="tab-pane" id="tab_4">
					               	<div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >银行结算账户户名</label>
					                  <div class="col-sm-8">
										<input type="text" class="form-control"  style="width: 150px;" id="str50_20" name="str50_20" value="">
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >开户银行</label>
					                  <div class="col-sm-8">
										<select id="str100_7" class="form-control"  name="str100_7" style="width: 150px;text-align: center;">
											<option value="">--请选择--</option>
										</select>
					                  </div>
					                </div>
					                <div class="form-group">
					                  <label for="inputOrgCname" class="col-sm-4 control-label" >银行账号</label>
					                  <div class="col-sm-8">
										<input type="text" class="form-control" style="width: 150px;" id="str100_8" name="str100_8" value="">
					                  </div>
					                </div>
					              </div>
					              <!-- /.tab-pane -->
					            </div>
					            <!-- /.tab-content -->
					          </div>
					          <!-- nav-tabs-custom -->
					        </div>
			                
			                
			                <div class="box-footer">
				                <button type="button" class="btn btn-primary pull-left" onclick="cannel();">取消</button>
				                <button type="button" class="btn btn-primary pull-right" onclick="save('orgForm');">提 交</button>
				            </div>
						</form>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>		
</div>  
  
  
  
</body>
	
<script type="text/template" id="dataList">
	  		<? for ( var i = 0; i < rows.length; i++) {?>
				<tr>
					<td style="display:none;"><?=rows[i].memberId?></td>
					<td><?=rows[i].memberEname?></td>
					<td><?=rows[i].memberCname?></td>
					<td>
						<?if(rows[i].memberType=='org'){?>
								机构
						<?}else{?>
								个人
						<?}?>
					</td>
					<td>
						<?=rows[i].createTime?>
					</td>
					<td>  
						<button type="button" class="btn btn-danger btn-xs" onclick="toAudit('<?=rows[i].memberId?>');">审核</button>
					</td>
				</tr>
     		<?}?>
	</script>

<script>
var clickMenu= 'product-audit-list';
var id;
$(function () {
	//初始化数据字典，无论新增或修改
	DictUtil.getCheckboxList("#memberRoleArray",'memberRoles', dictUrl, {cateEname:"memberType"});
	DictUtil.getDictExtList("#certType", dictUrl, {cateEname:"certType"});//证件类型
	DictUtil.getDictExtList("#str50_4", dictUrl, {cateEname:"education"});//教育情况
	DictUtil.getDictExtList("#str100_7", dictUrl, {cateEname:"bank"});//开户银行
	
	getTableData();
	
	setToken();
	
	$('#example tbody').on('click','tr', function (e) {
	     if ( $(this).hasClass('selected') ) {
	            //$(this).removeClass('selected');
	        }
	        else {
	            $('tr.selected').removeClass('selected');
	            $(this).addClass('selected');
	        }
	     id = $('tr.selected td').eq(0).html();
	   //  console.log($('tr.selected td').eq(1).html())
	   
	} );
	

	
	
  });

function getTableData(){
	//deleteAllRow('example');
	$.ajax({
		   type:'get',
		   url:common_list_url,
		   data:$('#searchFrom').serialize()+getCurrentPage(common_list_url+"?"+$('#searchFrom').serialize(),10),
		   dataType:'json',
		   success: function(myData){
			var data = baidu.template('dataList',eval(myData));  
			$("#myList").html(data);
			  var option= {
					   ele:$("#pageList")[0],
					   total:myData.total,
					   fn:getTableData,
					   url:common_list_url+"?"+$('#searchFrom').serialize()
				   }
			generatePages(option);
		   }
		});	
  }

/* //设置模态框隐藏事件钩子  
$( '#my_modal' ).on( 'hide.bs.modal' ,function(e){  
	cleanData('orgFormData');
}); */ 

//设置模态框隐藏事件钩子  
/* $( '#my_modal' ).on( 'show.bs.modal' ,function(e){  
	$.ajax({
	    type:'get',
	    url:'${ctx}/sendPage/token?token=true',
	    dataType:'json',
	    success: function(myData){
	    	//console.log(myData);
			 $('#formToken').val(myData);
	  	}
	});	
}); 

function cleanData(id){
	$(':input','#'+id)  
	 .not(':button, :submit, :reset, :hidden')  
	 .val('')  
	 //.removeAttr('checked')  
	 .removeAttr('selected'); 
}
  
function toAddOrg(){
	$('#my_modal').modal('show');
} */



/* 
function save(formId){
	
	if(!$("#" + formId)[0].checkValidity()){
		alert("请先完善必输项和必选项！");
		return ;
	}
	
	$.ajax({
	    type:'post',
	    url:common_submit_url,
	    data:$("#"+formId).serialize(),
	    dataType:'json',
	    success: function(myData){
	    	//console.log(myData);
	    	if(myData.flag=='T'){
	    		alert("添加成功！");
	    		$('#my_modal').modal('hide');
	    		refresh();
	    	}

	  	}
	});	
}
 */
function toAudit(memberId){
	window.location.href="${ctx}/sendPage/sale/admin/finance/product-audit?memberId="+memberId;
}


/* function cannel(){
	$('#my_modal').modal('hide');

}

function refresh(){
    //window.location.reload();
	getTableData();
}


function setToken(){
	$.ajax({
	    type:'get',
	    url:'${ctx}/sendPage/token?token=true',
	    dataType:'text',
	    success: function(myData){
	    	console.log(myData);
			 $('#formToken').val(myData);
	  	}
	});	
} */

</script>
</html>
